package cn.bdqn.fifthmedic.sys.controller;

import cn.bdqn.fifthmedic.model.EUNode;
import cn.bdqn.fifthmedic.sys.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Yuan
 * @create 2020-02-12 14:24
 */
@RestController
@RequestMapping("/sys/perm")
public class PermissionController {

    @Autowired
    private PermissionService permissionService;
    @GetMapping("/index")
    public String page(){
        return "index";
    }

    @GetMapping
    public List<EUNode> list(){
        return permissionService.getMenu();
    }
}
